<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:p="http://primefaces.org/ui"
	  xmlns:composite="http://xmlns.jcp.org/jsf/composite"
	  xmlns:c="http://java.sun.com/jsp/jstl/core"
	  xmlns:series="http://xmlns.jcp.org/jsf/composite/series">

	<composite:interface>
		<composite:attribute name="model" required="true" type="org.plotfaces.model.Model"/>
		<composite:attribute name="collapseHandler" required="true" type="org.plotfacesdemo.CollapseHandler"/>
		<composite:attribute name="plot" required="true" type="java.lang.String"/>
	</composite:interface>

    <composite:implementation>
		<!--
			All message resources should have the _axis suffix.
		-->

		<p:tabView id="seriesTabView">
			<p:tab id="defaultSeriesTab" title="#{msg.defaultSeriesOptions}">
				<series:series series="#{cc.attrs.model.seriesDefaults}" collapseHandler="#{cc.attrs.collapseHandler}" plot="#{cc.attrs.plot}" refresh="seriesTabView"/>
			</p:tab>
			<c:forEach var="series" items="#{cc.attrs.model.series}" varStatus="status">
				<p:tab title="#{msg.series}: #{status.index} (#{series.label} - #{series.index})">
					<series:series series="#{series}" collapseHandler="#{cc.attrs.collapseHandler}" plot="#{cc.attrs.plot}" refresh="seriesTabView"/>
				</p:tab>
			</c:forEach>
		</p:tabView>
	</composite:implementation>
</html>

